# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-validators
pkgver=0.22.0
pkgrel=0
pkgdesc="Python3 Data Validation for Humans"
url="https://github.com/python-validators/validators"
arch="noarch"
license="MIT"
depends="py3-decorator"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-isort py3-pytest py3-flake8"
subpackages="$pkgname-pyc"
source="https://github.com/python-validators/validators/archive/$pkgver/py3-validators-$pkgver.tar.gz"
builddir="$srcdir/validators-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
61a39c141138dca3d0ea691255cc448475078b9100185a88ceb779308014c136b47331121f0473bfc3d1d2dd8ddbaf9f16bdf22c04e854e47d36c6701a0f704e  py3-validators-0.22.0.tar.gz
"
